Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <body> <p>Select your favorite browser:</p> <form action="http://www.w3schools.com/jsref/form_action.asp"> <input type="radio" name="browser" onclick="myFunction(this.value)" value="Internet Explorer">Internet Explorer<br> <input type="radio" name="browser" onclick="myFunction(this.value)" value="Firefox">Firefox<br> <input type="radio" name="browser" onclick="myFunction(this.value)" value="Opera">Opera<br> <input type="radio" name="browser" onclick="myFunction(this.value)" value="Google Chrome">Google Chrome<br> <input type="radio" name="browser" onclick="myFunction(this.value)" value="Safari">Safari<br><br> Your favorite browser is: <input type="text" id="result"> <input type="submit" value="Submit form"> </form> <script> function myFunction(browser) { document.getElementById("result").value = browser; } </script> </body> <!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_radio_value3 by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 08:33:28 GMT --> </html>
Result:
Try it Yourself - © w3schools.com